package TicketingSystem;

import java.sql.Time;
import java.sql.Date;

// 活动实体类
class User {
    private int userID;
    private String username;
    private String password;
    private String contactInfo;
    private String userType;

    // 构造函数
    public User(String username, String password, String contactInfo, String userType) {
        this.username = username;
        this.password = password;
        this.contactInfo = contactInfo;
        this.userType = userType;
    }

    //     Getters 和 Setters 方法
    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getContactInfo() {
        return contactInfo;
    }

    public void setContactInfo(String contactInfo) {
        this.contactInfo = contactInfo;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String contactInfo) {
        this.userType = userType;
    }

    // toString 方法，方便打印用户信息
    @Override
    public String toString() {
        return "User{" +
                "userID=" + userID +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ",userType='" + userType + '\'' +
                ", contactInfo='" + contactInfo + '\'' +
                '}';
    }
}

class Event {
    private int eventID;
    private String eventName;
    private String director;
    private String description;
    private Date eventDate;
    private Time startTime;
    private Time endTime; // 新增字段
    private int venueID;
    private int capacity;
    private String salesMode;

    public Event(int eventID, String eventName, String director, String description, Date eventDate, Time startTime, Time endTime, int venueID, int capacity, String salesMode) {
        this.eventID = eventID;
        this.eventName = eventName;
        this.director = director;
        this.description = description;
        this.eventDate = eventDate;
        this.startTime = startTime;
        this.endTime = endTime; // 初始化 endTime
        this.venueID = venueID;
        this.capacity = capacity;
        this.salesMode = salesMode;
    }

    // Getter 和 Setter 方法
    public int getEventID() {
        return eventID;
    }

    public void setEventID(int eventID) {
        this.eventID = eventID;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getEventDate() {
        return eventDate;
    }

    public void setEventDate(Date eventDate) {
        this.eventDate = eventDate;
    }

    public Time getStartTime() {
        return startTime;
    }

    public void setStartTime(Time startTime) {
        this.startTime = startTime;
    }

    public Time getEndTime() {
        return endTime;
    }

    public void setEndTime(Time endTime) {
        this.endTime = endTime;
    }

    public int getVenueID() {
        return venueID;
    }

    public void setVenueID(int venueID) {
        this.venueID = venueID;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public String getSalesMode() {
        return salesMode;
    }

    public void setSalesMode(String salesMode) {
        this.salesMode = salesMode;
    }
}

class Movie {
    private int movieID;
    private String movieName;
    private int releaseYear;
    private String actors;
    private String director;
    private String screenwriter;
    private String plot;

    public Movie(int movieID, String movieName, int releaseYear, String actors, String director, String screenwriter, String plot) {
        this.movieID = movieID;
        this.movieName = movieName;
        this.releaseYear = releaseYear;
        this.actors = actors;
        this.director = director;
        this.screenwriter = screenwriter;
        this.plot = plot;
    }

    // Getters and Setters
    public int getMovieID() {
        return movieID;
    }

    public void setMovieID(int movieID) {
        this.movieID = movieID;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public int getReleaseYear() {
        return releaseYear;
    }

    public void setReleaseYear(int releaseYear) {
        this.releaseYear = releaseYear;
    }

    public String getActors() {
        return actors;
    }

    public void setActors(String actors) {
        this.actors = actors;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getScreenwriter() {
        return screenwriter;
    }

    public void setScreenwriter(String screenwriter) {
        this.screenwriter = screenwriter;
    }

    public String getPlot() {
        return plot;
    }

    public void setPlot(String plot) {
        this.plot = plot;
    }
}

class Venue {
    private int venueID;
    private String venueName;
    private String address;
    private int capacity;
    private int hallID;
    private String hallName;
    private int hallCapacity;

    // getter setter方法
    public int getVenueID() {
        return venueID;
    }

    public void setVenueID(int venueID) {
        this.venueID = venueID;
    }

    public String getVenueName() {
        return venueName;
    }

    public void setVenueName(String venueName) {
        this.venueName = venueName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public int getHallID() {
        return hallID;
    }

    public void setHallID(int hallID) {
        this.hallID = hallID;
    }

    public String getHallName() {
        return hallName;
    }

    public void setHallName(String hallName) {
        this.hallName = hallName;
    }

    public int getHallCapacity() {
        return hallCapacity;
    }

    public void setHallCapacity(int hallCapacity) {
        this.hallCapacity = hallCapacity;
    }
}

class Hall {
    private int hallID;
    private String hallName;
    private int hallCapacity;

    public Hall(int hallID, String hallName, int hallCapacity) {
        this.hallID = hallID;
        this.hallName = hallName;
        this.hallCapacity = hallCapacity;
    }

    public int getHallID() {
        return hallID;
    }

    public String getHallName() {
        return hallName;
    }

    public int getHallCapacity() {
        return hallCapacity;
    }
}

// 场地预定实体类
class VenueBooking {
    private int bookingID;
    private int userID;
    private int venueID;
    private java.sql.Timestamp bookingDate;
    private Date startDate;
    private Time startTime;
    private Date endDate;
    private Time endTime;
    private int hallID; // 新增字段

    // Getters 和 Setters 方法
    public int getBookingID() {
        return bookingID;
    }

    public void setBookingID(int bookingID) {
        this.bookingID = bookingID;
    }

    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }

    public int getVenueID() {
        return venueID;
    }

    public void setVenueID(int venueID) {
        this.venueID = venueID;
    }

    public java.sql.Timestamp getBookingDate() {
        return bookingDate;
    }

    public void setBookingDate(java.sql.Timestamp bookingDate) {
        this.bookingDate = bookingDate;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Time getStartTime() {
        return startTime;
    }

    public void setStartTime(Time startTime) {
        this.startTime = startTime;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Time getEndTime() {
        return endTime;
    }

    public void setEndTime(Time endTime) {
        this.endTime = endTime;
    }

    public int getHallID() {
        return hallID;
    }

    public void setHallID(int hallID) {
        this.hallID = hallID;
    }
}


class Order {
    private int orderID;
    private Date orderDate;
    private String startDate;
    private String startTime;
    private  String endTime;
    private double totalAmount;
    private String orderStatus;
    private String refundStatus;
    private  int userID;
    private String movieName;
    private String venueName;
    private String hallName;

    public Order () {

    }

    // 构造函数
    public Order(int orderID, Date orderDate, double totalAmount, String orderStatus, String refundStatus, String movieName, String venueName, String hallName) {
        this.orderID = orderID;
        this.orderDate = orderDate;
        this.totalAmount = totalAmount;
        this.orderStatus = orderStatus;
        this.refundStatus = refundStatus;
        this.movieName = movieName;
        this.venueName = venueName;
        this.hallName = hallName;
    }


    public int getOrderID() {
        return orderID;
    }

    public void setOrderID(int orderID) {
        this.orderID = orderID;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(int totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(String refundStatus) {
        this.refundStatus = refundStatus;
    }

    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public String getVenueName() {
        return venueName;
    }

    public void setVenueName(String venueName) {
        this.venueName = venueName;
    }

    public String getHallName() {
        return hallName;
    }

    public void setHallName(String hallName) {
        this.hallName = hallName;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}

class RefundApplication {
    private int orderID;
    private String movieName;
    private String venueName; // 新增属性
    private String hallName;  // 新增属性
    private String refundReason;
    private String refundStatus;

    public  RefundApplication () {

    }
    // 构造函数
    public RefundApplication(int orderID, String movieName, String venueName, String hallName, String refundReason, String refundStatus) {
        this.orderID = orderID;
        this.movieName = movieName;
        this.venueName = venueName;
        this.hallName = hallName;
        this.refundReason = refundReason;
        this.refundStatus = refundStatus;
    }

    public int getOrderID() {
        return orderID;
    }

    public void setOrderID(int orderID) {
        this.orderID = orderID;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public String getVenueName() { // 新增 getter 方法
        return venueName;
    }

    public void setVenueName(String venueName) { // 新增 setter 方法
        this.venueName = venueName;
    }

    public String getHallName() { // 新增 getter 方法
        return hallName;
    }

    public void setHallName(String hallName) { // 新增 setter 方法
        this.hallName = hallName;
    }

    public String getRefundReason() {
        return refundReason;
    }

    public void setRefundReason(String refundReason) {
        this.refundReason = refundReason;
    }

    public String getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(String refundStatus) {
        this.refundStatus = refundStatus;
    }
}